<%--
 *  File:    FavoriteHandler.jsp
 *  @Author: Rael Zhu 
 *  Date:    2003/10/13
 *
 *  Copyright (C) 2000 - 2001 Oval Technologies, Inc.
 *  All rights reserved. 
 *
 *  This software is the confidential and proprietary information of Oval 
 *  Technologies, Inc. ("Confidential Information").  You shall not
 *  disclose such Confidential Information and shall use it only in
 *  accordance with the terms of the license agreement you entered into
 *  with Oval.
--%>

<%@ page language="java" %>     
<%@ page import="java.util.*" %>
<%@ page import="org.apache.log4j.Category" %>
<%@ page import="com.oval.util.*" %>
<%@ page contentType = "text/html;charset=UTF-8" %>
<%@ taglib uri="/WEB-INF/PageFlow.tld" prefix="PageFlow" %>

<%
  String strModuleName = "UPM";
%>

<%@include file="/inc/PageDefault.inc" %>

<html>
<head>
<title></title>
<%
  Integer curFavoriteMenuId = (Integer)session.getAttribute("favoritemenuid");
  if (curFavoriteMenuId == null)
    curFavoriteMenuId = new Integer(-1);
  else
    session.removeAttribute("favoritemenuid");
  java.sql.Date curDate = new java.sql.Date(System.currentTimeMillis());
%>
<script language="JavaScript">

function addToFavorite(code)
{
  if (code != "")
  {
    if (!confirm("<%= message.getMessageDesc("SURE_TO_ADD_TO_FAVORITE") %>")) return;
    
    frm.privcode.value = code;
    frm.actionname.value = "add";
    frm.submit();
  }
}

</script>
</head>
<body>

<form name="frm" method="post" action="Dispatcher" target="_self">
  <input type="hidden" name="pagename" value="favoritehandler">
  <input type="hidden" name="actionname">
  
  <input type="hidden" name="privcode" value="">
  <input type="hidden" name="datelastupdated" value="<%=JspHelper.filterNull( curDate )%>">
</form>

<%
  if (curFavoriteMenuId.intValue() > 0)
  {
%>
  <script language="JavaScript">
  
  alert("<%= message.getMessageDesc("PAGE_ADDED_SUCCESFULLY") %>");
  
  </script>
<%
  }
%>

</body>
</html>
